package com.market.manage.mapper;

import com.market.manage.po.AttRec;
import com.market.manage.po.AttRecExample;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

public interface AttRecMapper {
    @Update("UPDATE ATT_REC SET STATUS='4' WHERE USERID=#{0} AND STATUS='3'")
    int piZhun(Long userId);

    int countByExample(AttRecExample example);

    int deleteByExample(AttRecExample example);

    int deleteByPrimaryKey(Long id);

    int insert(AttRec record);

    int insertSelective(AttRec record);

    List<AttRec> selectByExample(AttRecExample example);

    AttRec selectByPrimaryKey(Long id);

    int updateByExampleSelective(@Param("record") AttRec record, @Param("example") AttRecExample example);

    int updateByExample(@Param("record") AttRec record, @Param("example") AttRecExample example);

    int updateByPrimaryKeySelective(AttRec record);

    int updateByPrimaryKey(AttRec record);

    @Select("SELECT COUNT(ID) FROM ATT_REC WHERE TO_DAYS(ATT_TIME) = TO_DAYS(NOW()) AND STATUS=#{0}")
    Long count(String status);

}
